package com.luxuewen.sxa.entity.response;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.luxuewen.sxa.entity.SxaDepartments;
import com.luxuewen.sxa.entity.SxaRoles;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author wen
 */
@Data
public class UserListRes implements Serializable {
    /**
     * 后台用户表
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 头像
     */
    @NotNull
    private String avatar;

    /**
     * 姓名
     */
    @NotNull
    private String name;

    /**
     * 用户名(登录账号)
     */
    @NotNull
    private String username;

    /**
     * 用户密码
     */
    @NotNull
    private String password;

    /**
     * 用户状态：0，禁用；1，启用
     */
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    private List<UserDeptRes> departments;

    private List<UserRoleRes> roles;

    private List<String> role;
}
